home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Apple WWDC 1996
/
WWDC96_1996 (CD).toast
/
Technology Materials
/
MacOS 8 Resources
/
Developer Tools
/
Mac OS 8 Interfaces & Libraries
/
Interfaces
/
PInterfaces
/
Multiprocessing.p
< prev
next >
Wrap
Text File
|
1996-05-01
|
4KB
|
117 lines
{
File: Multiprocessing.p
Contains: Multiprocessing interfaces
Version: Technology: System 8
Release: Universal Interfaces 3.0d3 on Copland DR1
Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
Bugs?: If you find a problem with this file, send the file and version
information (from above) and the problem description to:
Internet: apple.bugs@applelink.apple.com
AppleLink: APPLE.BUGS
}
{$IFC UNDEFINED UsingIncludes}
{$SETC UsingIncludes := 0}
{$ENDC}
{$IFC NOT UsingIncludes}
UNIT Multiprocessing;
INTERFACE
{$ENDC}
{$IFC UNDEFINED __MULTIPROCESSING__}
{$SETC __MULTIPROCESSING__ := 1}
{$I+}
{$SETC MultiprocessingIncludes := UsingIncludes}
{$SETC UsingIncludes := 1}
{$IFC UNDEFINED __TYPES__}
{$I Types.p}
{$ENDC}
{$IFC UNDEFINED __CODEFRAGMENTS__}
{$I CodeFragments.p}
{$ENDC}
{$IFC UNDEFINED __KERNEL__}
{$I Kernel.p}
{$ENDC}
{$IFC UNDEFINED __TIMING__}
{$I Timing.p}
{$ENDC}
{$PUSH}
{$ALIGN POWER}
{$LibExport+}
{$IFC FOR_SYSTEM7_ONLY }
TYPE
MPTaskID = ^LONGINT;
MPQueueID = ^LONGINT;
MPTaskOptions = UInt32;
TaskProc = ProcPtr; { FUNCTION TaskProc(parameter: UNIV Ptr): OSStatus; C; }
CONST
kDurationImmediate = 0;
kDurationForever = $7FFFFFFF;
{$ENDC}
{$IFC FOR_SYSTEM8_PREEMPTIVE }
TYPE
MPTaskID = TaskID;
MPQueueID = KernelQueueID;
MPTaskOptions = TaskOptions;
{$ENDC}
{$IFC FOR_SYSTEM7_AND_SYSTEM8_PREEMPTIVE }
TYPE
MPSemaphoreID = ^LONGINT;
MPCriticalRegionID = ^LONGINT;
MPSemaphoreCount = UInt32;
CONST
kMPNoID = 0;
{$ENDC}
{$IFC FOR_SYSTEM7_AND_SYSTEM8_PREEMPTIVE }
FUNCTION MPProcessors: UInt32; C;
FUNCTION MPCreateTask(taskEntryPoint: TaskProc; taskParameter: UNIV Ptr; stackSize: ByteCount; notifyQ: MPQueueID; notifyParameter1: UNIV Ptr; notifyParameter2: UNIV Ptr; options: MPTaskOptions; VAR newTask: MPTaskID): OSStatus; C;
FUNCTION MPTerminateTask(task: MPTaskID; terminationStatus: OSStatus): OSStatus; C;
PROCEDURE MPExit(terminationStatus: OSStatus); C;
FUNCTION MPCurrentTaskID: MPTaskID; C;
PROCEDURE MPYield; C;
FUNCTION MPCreateQueue(VAR queue: MPQueueID): OSStatus; C;
FUNCTION MPDeleteQueue(queue: MPQueueID): OSStatus; C;
FUNCTION MPNotifyQueue(queue: MPQueueID; param1: UNIV Ptr; param2: UNIV Ptr; param3: UNIV Ptr): OSStatus; C;
FUNCTION MPWaitOnQueue(queue: MPQueueID; VAR param1: UNIV Ptr; VAR param2: UNIV Ptr; VAR param3: UNIV Ptr; timeout: Duration): OSStatus; C;
FUNCTION MPCreateSemaphore(maxVal: MPSemaphoreCount; initVal: MPSemaphoreCount; VAR semaphore: MPSemaphoreID): OSStatus; C;
FUNCTION MPCreateBinarySemaphore(VAR semaphore: MPSemaphoreID): OSStatus; C;
FUNCTION MPWaitOnSemaphore(semaphore: MPSemaphoreID; timeout: Duration): OSStatus; C;
FUNCTION MPSignalSemaphore(semaphore: MPSemaphoreID): OSStatus; C;
FUNCTION MPDeleteSemaphore(semaphore: MPSemaphoreID): OSStatus; C;
FUNCTION MPCreateCriticalRegion(VAR region: MPCriticalRegionID): OSStatus; C;
FUNCTION MPEnterCriticalRegion(region: MPCriticalRegionID; timeout: Duration): OSStatus; C;
FUNCTION MPExitCriticalRegion(region: MPCriticalRegionID): OSStatus; C;
FUNCTION MPDeleteCriticalRegion(region: MPCriticalRegionID): OSStatus; C;
FUNCTION MPAllocate(size: ByteCount): LogicalAddress; C;
PROCEDURE MPFree(block: LogicalAddress); C;
PROCEDURE MPBlockCopy(sourcePtr: LogicalAddress; destPtr: LogicalAddress; bytes: ByteCount); C;
{$ENDC}
{$ALIGN RESET}
{$POP}
{$SETC UsingIncludes := MultiprocessingIncludes}
{$ENDC} {__MULTIPROCESSING__}
{$IFC NOT UsingIncludes}
END.
{$ENDC}